import type { AddCardParams, CardListData, CardListParams } from '@/types/card'
import { request } from '@/utils/reuqest'

/**
 * 获取月卡列表
 * @param { page, pageSize} params
 * @returns
 */
export const getCardListAPI = (params: CardListParams) => {
  return request<CardListData>('/parking/card/list', 'GET', params)
}


/**
 * 添加月卡
 * */ 
export const addCardAPI = (data: AddCardParams) => request('/parking/card', 'POST', data)

// 编辑月卡
export const editCardAPI = (data: AddCardParams) => request('/parking/card/edit', 'PUT', data)

// 获取月卡详情
export const getCardDetailAPI = (id: string) => request<AddCardParams>(`/parking/card/detail/${id}`, 'GET')